fn add_one(x: i32) -> i32 {
    x + 1
}
fn do_twice(f: fn(i32) -> i32, arg: i32) -> i32 {
    f(arg) + f(arg)
}
#[derive(Debug)]
enum Status {
    Value(u32),
    Stop,
}
fn main() {
    let answer = do_twice(add_one, 5);
    println!("The anwser is: {}", answer);
    let list_of_number = vec![1, 2, 3];
    // let list_of_stirngs: Vec<String> = list_of_number.iter().map(|i| i.to_string()).collect();
    // let list_of_stirngs: Vec<String> = list_of_number.iter().map(ToString::to_string).collect();
    let list_of_stirngs: Vec<Status> = (0u32..20).map(Status::Value).collect();

    println!("{list_of_stirngs:?}");
    fn returns_closure() -> Box<dyn Fn(i32) -> i32> {
        Box::new(|x| x + 1)
    }
}
